import { singleSpaVue, Vue, AppOptions, AppInfo } from '#/components/spa/common'
import * as storeInstance from './globalStore'
if (process.env.NODE_ENV === 'development') require('@/service/mock-api.js')

const vueLifecycles = singleSpaVue({
  Vue,
  appOptions: AppOptions
})

export const bootstrap = (props) => {
  Vue.prototype.$reduxStore = props || {}
  return vueLifecycles.bootstrap(props)
}
export const mount = vueLifecycles.mount
export const unmount = vueLifecycles.unmount
export default { ...AppInfo, store: storeInstance }
